from typing import Optional
try:
    from pydantic_settings import BaseSettings
except ImportError:
    from pydantic import BaseSettings


class Settings(BaseSettings):
    """Application settings."""
    model_name: str = "microsoft/DialoGPT-medium"
    model_path: Optional[str] = None
    backend: str = "transformers"  # vllm, sglang, transformers
    host: str = "0.0.0.0"
    port: int = 8000
    dtype: str = "auto"
    trust_remote_code: bool = False
    
    class Config:
        env_file = ".env"


settings = Settings()